#[==[
Provides the following variables:

  * `MySQL_INCLUDE_DIRS`: Include directories necessary to use MySQL.
  * `MySQL_LIBRARIES`: Libraries necessary to use MySQL.
  * A `MySQL::MySQL` imported target.
#]==]

set(Protobuf_FOUND 0)

set(_Protobuf_LIBRARY "${CMAKE_SOURCE_DIR}/dep/protobuf/lib/libprotobuf.lib")
if (NOT WIN32)
  set(_Protobuf_LIBRARY "${CMAKE_SOURCE_DIR}/dep/protobuf/lib/libprotobuf.a")
endif ()

if(NOT Protobuf_FOUND)
    set(Protobuf_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/dep/protobuf/include")
  #find_path(Protobuf_INCLUDE_DIR
   # NAMES google
   # PATHS
   #   ${CMAKE_SOURCE_DIR}/dep/protobuf
   # PATH_SUFFIXES include
   # DOC "Location of Protobuf.h")
  mark_as_advanced(Protobuf_INCLUDE_DIR)
  #find_library(Protobuf_LIBRARY
  #  NAMES libprotobuf
  #  PATHS
  #    ${CMAKE_SOURCE_DIR}/dep/protobuf
  #  PATH_SUFFIXES lib
  #  DOC "Location of the Protobuf library")
  set(Protobuf_LIBRARY "${_Protobuf_LIBRARY}")
  mark_as_advanced(Protobuf_LIBRARY)

  include(FindPackageHandleStandardArgs)
  find_package_handle_standard_args(Protobuf
    REQUIRED_VARS Protobuf_INCLUDE_DIR Protobuf_LIBRARY)

  if (Protobuf_FOUND)
    add_library(Protobuf UNKNOWN IMPORTED)
    set_target_properties(Protobuf PROPERTIES
      IMPORTED_LOCATION "${Protobuf_LIBRARY}"
      INTERFACE_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}")
    set(Protobuf_INCLUDE_DIRS "${Protobuf_INCLUDE_DIR}")
    set(Protobuf_LIBRARIES "${Protobuf_LIBRARY}")
  endif ()
endif ()

